﻿using System.IO;
using System.Windows;
using FileCopyExtensions;

namespace WpfApplication_DockPanel
{
    /// <summary>
    /// Logique d'interaction pour MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            runCopy();
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            fileCopyExtensions_ui1.cancelCopy();
        }

        private void button3_Click(object sender, RoutedEventArgs e)
        {
            fileCopyExtensions_ui1.stopCopy();
        }

        private void button4_Click(object sender, RoutedEventArgs e)
        {
            runCopy();
        }


        private void runCopy()
        {
            FileInfo source, dest;
            source = new FileInfo(@"\\FREEBOX\Disque dur\Vidéos\A Nous Quatre.avi");
            dest = new FileInfo(@"H:\autre\tmp");

            fileCopyExtensions_ui1.FileSource = source;
            fileCopyExtensions_ui1.FolderDestination = dest;

            fileCopyExtensions_ui1.runCopy(CopyFileOptions.All);
        }

    }
}
